package net.ib.mtalk.network.task;

import android.content.Context;
import android.os.Handler;
import net.ib.mntalk.protocol.Common.UUIDMsg;
import net.ib.mntalk.protocol.Session.RemoveBuddiesReq;
import net.ib.mtalk.network.MethodId.Session;
import net.ib.mtalk.network.TcpEnvelope;
import net.ib.mtalk.util.GpbSupport;
import net.ib.mtalk.util.NotifyingAsyncQueryHandler;

public class RemoveBuddiesTask extends AsyncNetTask {
	
	private int index;

	public RemoveBuddiesTask(Context _context, Handler _uiHandler, int _index) {
		super(_context, _uiHandler);
		mContext = _context;
		mUiHandler = _uiHandler;
		index = _index;
	}

	@Override
	protected TcpEnvelope onPreExecute() {
		RemoveBuddiesReq removeBuddiesReq = new RemoveBuddiesReq();
//		removeBuddiesReq.setUserUuid(GpbSupport.makeUuidMsg(333, 444));
		removeBuddiesReq.setBuddyUuid(index, GpbSupport.makeUuidMsg(444, 555));
		
		TcpEnvelope rev = new TcpEnvelope.Builder()
			.setType(TcpEnvelope.REQUEST)
			.setMessage(removeBuddiesReq)
			.setMethodId(Session.Contact.RemoveBuddies)
			.build();
		return rev;
	}

	@Override
	protected void onPostExecute(int resultCode, Object requestObj,
			Object resultObj) {
		// TODO Auto-generated method stub

	}

}
